<!DOCTYPE HTML>
<html>

<<<<<<< HEAD
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="HandheldFriendly" content="true" />
		<meta name="MobileOptimized" content="320" />
		<link rel="stylesheet" href="./css/reset.css">
		<link rel="stylesheet" href="./css/jiazai.css">
		<title>首页</title>
		<style>
			[v-cloak] {
				display: none;
			}
			.par{
				padding: 50px 20px;
			}
			.warp{
				flex: 1 1 0;
				padding: 30px 0;
				border-radius: 5px;
				box-shadow:1px 1px 1px 1px #F0F0F0;
			}
			.img-com{
				
				flex-direction: column;
			}
			.img-com>img{
				height: 50px;
				width: auto;
				padding-bottom: 5px;
			}
			.img-com>span{
				font-size: 15px;
				color: #5DAF34;
			}
		</style>
	</head>

	<body>
		<div id="app" v-cloak>
			<!-- 加载中动画 -->
			<div id='jiazai-ani' v-if='jiazai'>
				<div class="arc"></div>
				<h1><span>LOADING</span></h1>
			</div>
			<!-- 加载中动画 -->
			<div class="dis-spa par">
				<div class="dis-cen warp" style="margin-right: 30px;" @click="openNoDoodel">
					<div class="dis-cen img-com">
						<img src="img/no-noodel.PNG">
						<span>待出餐</span>
					</div>
				</div>
				<div class="dis-cen warp" @click="openYesDoodel">
					<div class="dis-cen img-com">
						<img src="img/yes-noodel.PNG">
						<span>已出餐</span>
					</div>
				</div>
			</div>
<<<<<<< HEAD
			
=======
>>>>>>> 8b04caa87765aef53492c5ed729371362bed1d15

		</div>
		<script src="js/comm.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/update.js" type="text/javascript" charset="utf-8"></script>
<<<<<<< HEAD
		<script src="js/tripledes.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/desutil.js" type="text/javascript" charset="utf-8"></script>
=======
>>>>>>> 8b04caa87765aef53492c5ed729371362bed1d15

		<script type="text/javascript" charset="utf-8">
			var app = new Vue({
				el: '#app',
				data: {
					//控制加载动画
<<<<<<< HEAD
					jiazai: false,
				},
				mounted() {
					console.log(createImgUrl)
					this.createImgUrl=String(createImgUrl);
					let a={code: "122"};
					var str = "( function(){var PWD = 'womendemengxiang';var IV = 'renkaiji';var encrypted = CryptoJS.DES.encrypt(val, CryptoJS.enc.Utf8.parse(PWD), {iv: CryptoJS.enc.Utf8.parse(IV),mode: CryptoJS.mode.CBC,padding: CryptoJS.pad.Pkcs7});var ran = Math.round(Math.random() * 8) + 1;var str= ran + encrypted.ciphertext.toString(CryptoJS.enc.Base64);return str.slice(0, ran) + ranStr(ran) + str.slice(ran);})();"
						  
						
					localStorage.setItem("han", str);         
					
					let e=encrypt(JSON.stringify(a));
					console.log(e)
=======
					jiazai: false
>>>>>>> 8b04caa87765aef53492c5ed729371362bed1d15
				},
				methods: {
					//打开待出餐页面
					openNoDoodel: function() {
						_openHref({
							url: 'no-noodel.html',
							id: 'noNoodel'
						});
					},
					//打开已出餐页面
					openYesDoodel: function() {
						_openHref({
							url: 'yes-noodel.html',
							id: 'yesNoodel'
						});
					}
				}
			});
		</script>
		<script type="text/javascript">
			var first = null;
			mui.back = function() {
				//首次按键，提示‘再按一次退出应用’
				if (!first) {
					first = new Date().getTime();
					plus.nativeUI.toast("再按一次退出程序");
					setTimeout(function() {
						first = null;
					}, 1000);
				} else {
					if (new Date().getTime() - first < 1000) {
						plus.runtime.quit();
					}
				}
			};
		</script>
	</body>

</html>
=======
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="HandheldFriendly" content="true" />
    <meta name="MobileOptimized" content="320" />
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./css/animate.css">
    <link rel="stylesheet" href="./css/index.css">
    <link rel="stylesheet" href="./css/swiper.min.css">
    <link rel="stylesheet" href="./css/jiazai.css">
    <link rel="stylesheet" href="./css/el/index.css">
    <title>首页</title>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <!-- 加载中动画 -->
        <div class='jiazai' v-if='jiazai'>
            <img src="./img/jia-ani.gif" width="50px" height="50px">
        </div>
        <!-- 加载中动画 -->

        <!-- 闪兑--自定义键盘 -->
        <div id='mask' @click='oofTransiaction=false;offKeyWord=false;' v-if='oofTransiaction'></div>
        <transition enter-active-class='animated fadeIn' enter-active-class='animated fadeOut'>
            <div class='transaction-input-wrap' v-if='oofTransiaction' @click='oofTransiaction=false;offKeyWord=false;'>
                <div class='trans-pass-content' @click.stop=''>
                    <div class='trans-hea'>
                        <span style="opacity:0">1</span>
                        <span>输入交易密码</span>
                        <img src="./img/close.svg" width="27px" height="27px" @click='oofTransiaction=false;offKeyWord=false;'>
                    </div>
                    <div class='trans-num' @click='openKeyWord'>
                        <span ref='input1'></span>
                        <span ref='input2'></span>
                        <span ref='input3'></span>
                        <span ref='input4'></span>
                        <span ref='input5'></span>
                        <span ref='input6'></span>
                    </div>
                    <button class='btn-com' @click='clkSubmit'>确认提交</button>
                </div>
            </div>
        </transition>
        <transition enter-active-class='animated fadeInUp' enter-active-class='animated fadeOutDown'>
            <div class="keyborad" v-if='offKeyWord'>
                <ul>
                    <li>
                        <dt @click="clkValue('1')">1</dt>
                        <dt @click="clkValue('2')">2</dt>
                        <dt @click="clkValue('3')">3</dt>
                    </li>
                    <li>
                        <dt @click="clkValue('4')">4</dt>
                        <dt @click="clkValue('5')">5</dt>
                        <dt @click="clkValue('6')">6</dt></li>
                    <li>
                        <dt @click="clkValue('7')">7</dt>
                        <dt @click="clkValue('8')">8</dt>
                        <dt @click="clkValue('9')">9</dt></li>
                    <li>
                        <dt @click="clkValue('.')">.</dt>
                        <dt @click="clkValue('0')">0</dt>
                        <dt @click="hide" class="iconfont icon-jianpanxiahua" style="display:flex; justify-content: center; align-item:center;">
                            <img src="./img/key-down.svg">
                        </dt>
                    </li>
                </ul>
                <div id="del" @click="del" class="del iconfont icon-jianpan_shanchu" style="display:flex; justify-content: center; align-item:center;">
                    <img src="./img/key-del.svg">
                </div>
                <div id="btn" class="button" @click="clkSubmit">
                    提交
                </div>
            </div>
        </transition>
        <!-- 闪兑--自定义键盘 -->

        <!-- 闪兑中选择币种弹窗 -->
        <div id='mask' v-if='showShandui' @click='showShandui=false'></div>
        <transition enter-active-class='animated fadeInUp' leave-active-class='animated fadeOutDown'>
            <div class='fixed-zujici' v-if='showShandui'>
                <div class='close-change-mon'>
                    <span style="opacity:0">1</span>
                    <span>选择币种</span>
                    <img @click='showShandui=false' src="./img/close.svg" width="24px" height="24px">
                </div>
                <div class='change-sandui-mon' v-for="(val,index) in hangList" :key='index' @click='inputSanMoney(val)'>
                    <img :src="val.coins_logo?HTTP+val.coins_logo:'./img/timg.svg'" width="25px" height="25px">
                    <div>
                        <p v-text='val.coins_ename'>ETC</p>
                        <p v-text='val.coins_ename2'>ETC</p>
                    </div>
                </div>
            </div>
        </transition>
        <!--闪兑中选择币种弹窗-->

        <!-- 资产板块 -->
        <transition enter-active-class='animated fadeIn'>
            <div id='assets-wrap' v-if='offBottom==1'>
                <div class='assets-fixed-top'>
                    <div class='avatar-wrap'>
                        <div>
                            <img style="border-radius:50%" :src="userAvatar" width="50px" height="50px" @click.stop='_openHref("system-set.html","systemSet");'>
                            <span v-text="JSON.parse(localStorage.getItem('user')).phone">158245454456</span>
                        </div>
                        <img src="./img/sao-white.svg" width="24px" height="22px" @click='qrClick'>
                    </div>
                    <div class='all-assets-wrap'>
                        <h1><span v-if='offShowMoney' style="font-size:20px;">$</span><span v-text='userAllAsset.toFixed(6)'>12345564.67</span></h1>
                        <p><span v-if='offShowMoney'>≈</span><span v-text='(userAllAsset*6.9368).toFixed(2)'>0.10000</span> CNY</p>
                        <div class='pay-qr-wrap'>
                            <img src="./img/get-money.svg" width="25px" height="25px" @click='_openHref("get-money.html","getMoney")'>
                            <span>|</span>
                            <img src="./img/pay-qr.svg" width="25px" height="25px" @click='qrClick'>
                        </div>
                    </div>
                    <div class='app-notice' @click='openNoticeList'>
                        <img src="./img/icon-notice.svg" width="15px" height="15px">
                        <span v-text='notiData.title'>请尽快备份助记词，否则钱包丢失将无法找回</span>
                    </div>
                </div>
                <div id='assets-fixed-content' class='assets-fixed-content'>
                    <div class='assets-list' v-for="(val,index) in assetData" :key='index' @click='goMoneyInfo(val)'>
                        <div class='assets-list-left'>
                            <img :src="val.coins_logo?HTTP+val.coins_logo:'./img/timg.png'" width="32px" height="32px">
                            <span v-text='val.coins_ename'>ETC</span>
                        </div>
                        <div class='assets-list-right'>
                            <P v-text='val.count'>0</P>
                            <P><span>≈￥</span><span v-text='_toFixed(parseFloat(val.coins_rmb)*parseFloat(val.count),2)'>2134.012</span></P>
                        </div>
                    </div>
                    <div id='ready-new-data' style="height:60px;display:flex;justify-content:center;align-items:center;">
                        <img v-if='!offUpFre' src="./img/down-loding.gif" width="80px" height="80px">
                    </div>
                </div>
            </div>
        </transition>
        <!-- 资产板块 -->

        <!-- 行情板块 -->
        <transition enter-active-class='animated fadeIn'>
            <div v-if='offBottom==2' style="background:#283138">
                <div class='hea-parquo-wrap'>
                    <div class='quo-search'>
                        <span>行情</span>
                        <img src="./img/search.svg" width="24px" height="24px" style="opacity:0">
                    </div>
                    <div class='quo-title'>
                        <div>
                            币种
                        </div>
                        <div id='hang-select'>
                            <el-select style="width:100px;line-height: 20px;" v-model="hangSort" placeholder="计价方式">
                                <el-option label="人民币" value="coins_rmb"></el-option>
                                <el-option label="美元" value="coins_usd"></el-option>
                                <el-option label="韩元" value="coins_krw"></el-option>
                            </el-select>
                        </div>
                        <div @click='bodongSort'>
                            <span>跌涨幅</span>
                            <img src="./img/sort.svg">
                        </div>
                    </div>
                </div>
                <div class='content-parqip-wrap'>
                    <div v-for="(val,index) in hangList" :key='index' v-if='hangList.length'>
                        <div class='money-list' @click='openK(val.kline,"hang-k-line"+index,true)'>
                            <div style="color:white;">
                                <img style="border-radius:50%;" :src="val.coins_logo?HTTP+val.coins_logo:'./img/timg.png'" width="24px" height="24px">
                                <span v-text='val.coins_ename'>BBT</span>
                            </div>
                            <div style="color:white;">
                                <span class='money-danwei'>$</span>
                                <span v-text='_toFixed(val.money,6)'>641245785.222315</span>
                                <br>
                                <span style="font-size:12px;color:#999;">￥</span><span style="font-size:12px;color:#999;" v-text='parseFloat(val.coins_rmb).toFixed(2)'>sdkfjk</span>
                            </div>
                            <div style="color:white;">
                                <div class='money-btn-color' v-text='String(val.change_percent).indexOf("-")== -1?("+"+ _toFixed(val.change_percent,2) +"%"): _toFixed(val.change_percent,2) +"%"' :style="{'background':val.change_percent>=0?'#5ba641':''}">
                                    -12.454
                                </div>
                            </div>
                        </div>
                        <div style="height:200px;display: none;" :id="'hang-k-line'+index" off='0'>

                        </div>
                    </div>
                </div>
            </div>
        </transition>
        <!-- 行情板块 -->

        <!-- 闪兑板块 -->
        <transition enter-active-class='animated fadeIn'>
            <div v-if='offBottom==3'>
                <div class='hea-shan-wrap'>
                    <h1>闪兑</h1>
                    <div class='shan-info-wrap'>
                        <div>
                            <div>
                                <div @click='thisTrans="out";showShandui=true;' class='trans-logo'>
                                    <img :src="transOutData.coins_logo?HTTP+transOutData.coins_logo:'./img/timg.png'" width="20px" height="20px">
                                    <span v-text='transOutData.coins_ename'>ETC</span>
                                </div>
                                <div class='san-input'>
                                    <input type="text" style="padding:10px;" v-model='tranSend.outCount' placeholder="请输入转出数量">
                                </div>
                            </div>
                            <div class='san-middle'>
                                <img @click='toggInOut' src="./img/transiform.svg" width="27px" height="27px">
                            </div>
                            <div>
                                <div @click='thisTrans="in";showShandui=true;' class='trans-logo'>
                                    <img :src="transInData.coins_logo?HTTP+transInData.coins_logo:'./img/timg.png'" width="20px" height="20px">
                                    <span v-text='transInData.coins_ename'>ETC</span>
                                </div>
                                <div class='san-input'>
                                    <input type="number" style="padding:10px;" :value='Number(inCount).toFixed(6)' readonly placeholder="接收币种数量">
                                </div>
                            </div>
                        </div>
                        <div class='huilv-computed'>
                            <p>汇率 <span>1</span> <span v-text='transOutData.coins_ename'>ETH</span> ≈ <span v-text='(transOutData.coins_usd/transInData.coins_usd).toFixed(6)'>2</span> <span v-text='transInData.coins_ename'>BTC</span></p>
                            <p v-if='transOutData.coins_ename&&this.tranSend.outCount' style="padding-top:6px;">手续费 ≈ <span v-text='comOtherMon.toFixed(6)'>2</span> <span v-text='transOutData.coins_ename'>BTC</span></p>
                        </div>
                        <button class='fast-conve' @click='fastConve'>快速兑换</button>
                    </div>
                </div>
                <div class='san-content-list-wrap'>
                    <div v-for="(val,index) in hangList" :key='index' v-if='hangList.length'>
                        <div class='money-list' @click='openK(val.kline,"kldom"+index)'>
                            <div>
                                <img :src="val.coins_logo?HTTP+val.coins_logo:'./img/timg.png'" width="24px" height="24px">
                                <span v-text='val.coins_ename'>BBT</span>
                            </div>
                            <div>
                                <span>$</span>
                                <span v-text='parseFloat(val.money).toFixed(6)'>64.2315</span>
                            </div>
                            <div>
                                <div class='money-btn-color' v-text='_toFixed(val.change_percent,2)+"%"' :style="{'background':val.change_percent>=0?'#5ba641':''}">
                                    -12.454
                                </div>
                            </div>
                        </div>
                        <div style="height:200px;display: none;" :id="'kldom'+index" off='0'>

                        </div>
                    </div>
                </div>
            </div>
        </transition>
        <!-- 闪兑板块 -->

        <!-- DAPP板块 animated fadeIn-->
        <transition enter-active-class='animated fadeIn'>
            <div class='dapp-wrap' v-if='offBottom==4'>
                <div class="swiper-container" id='dapp-swiper'>
                    <div class="swiper-wrapper">
                        <div class="swiper-slide" v-for="(val,index) in aplayData.banner" :key='index' v-if='val.news_img'>
                            <img :src="HTTP+val.news_img" width="100%" height="100%">
                        </div>
                    </div>
                    <div class="swiper-pagination"></div>
                </div>
                <div class='dapp-posi-con-wrap' style="padding:0 20px;">
                    <el-tabs v-model="adppChange" @tab-click="handleDappTap">
                        <el-tab-pane label="DAPP" name="first">
                            <div id='aplay-wrap' style="padding:0 20px;">
                                <div class='aplay-3-colum'>
                                    <div class="play-list" @click='_openHref("daxiao-homepage.html","daxiaoHomepage")'>
                                        <img src="./img/dapp-daxiao.png" width="90%">
                                    </div>
                                    <div class="play-list" @click='openOth("https://etherscan.io/")'>
                                        <img src="./img/dapp-yitai.png" width="90%">
                                    </div>
                                </div>
                                <div class='aplay-3-colum'>
                                    <div class="play-list" @click='openOth("https://blockexplorer.com/")'>
                                        <img src="./img/dapp-btc.png" width="90%">
                                    </div>
                                    <div class="play-list" @click='_openHref("shangwu-hezuo.html","shangwuHezuo")'>
                                        <img src="./img/dapp-shagnwu.png" width="90%">
                                    </div>
                                </div>
                                <div class='aplay-3-colum'>
                                    <div class="play-list spe-play-list">
                                        <img src="./img/dapp-more.png" width="90%">
                                    </div>
                                    <div class="play-list" style="opacity:0">
                                        <img src="./img/dapp-more.png" width="90%">
                                    </div>
                                </div>
                            </div>
                        </el-tab-pane>
                        <el-tab-pane label="快讯" name="fourth">
                            <div id='aplay-wrap' class='kuaixun'>
                                <div class='zixun-list' v-for="(val,index) in aplayData.news" :key='index' @click='openArticle(val)'>
                                    <div class='zixun-list-right'>
                                        <h1 v-text='val.title'>就开始打开了收到后尽快立开始打开了收到后尽快立法环境</h1>
                                        <p v-text='sliceDri(val.description)'>解开了士大夫卡萨丁撒娇客户了对方解开了士大夫卡萨丁撒娇客户了对方解开了士大夫卡萨丁撒娇客户了对方解开了士大夫卡萨丁撒娇客户了对方解开了士大夫卡萨丁撒娇客户了对方解开了士大夫卡萨丁撒娇客户了对方</p>
                                        <p>展开更多</p>
                                        <div class='zixun-time'>
                                            <span v-text='handleTime(val.addtime)'>2018-8-5</span>
                                            <img src="./img/air-share.png" width="18px" @click.stop='openArticle(val,true)'>
                                        </div>
                                        <div style="height:10px;background:rgba(249,249,249,.6);"></div>
                                    </div>
                                </div>
                                <div v-if='!offNoData1' id='ready-new-data1' style="height:60px;display:flex;justify-content:center;align-items:center;">
                                    <img v-if='!offNoData1' src="./img/down-loding.gif" width="80px" height="80px">
                                </div>
                                <div class='no-more-data' style="padding-bottom:20px;" v-if='offNoData1'>
                                    <span></span>
                                    <span>暂无更多数据</span>
                                    <span></span>
                                </div>
                            </div>
                        </el-tab-pane>
                    </el-tabs>
                </div>
            </div>
        </transition>
        <!-- DAPP板块 -->

        <!-- 我的板块 -->
        <transition enter-active-class='animated fadeIn'>
            <div class='my-info-wrap' v-if='offBottom==5'>
                <div class='align-hea-wrap'>
                    <div class='align-set'>
                        <img @click='_openHref("bill.html","bill")' src="./img/document-blue.png" width="40px">
                    </div>
                    <div class='align-login' @click='_openHref("system-set.html","systemSet")'>
                        <img :src="userAvatar" width="80px" height="80px" style="border-radius:50%;margin-right: 5px;">
                        <span v-text="JSON.parse(localStorage.getItem('user')).phone">154564152</span>
                    </div>
                    <div class='shou-ban'>
                        <div @click='_openHref("get-money.html","getMoney")'>
                            <img src="./img/shou-pay.png" height="50px">
                        </div>
                        <div style="height:40px;">
                            <div style="border-left:1px solid #5f91f9;height:40px;"></div>
                        </div>
                        <div @click='goDog'>
                            <img src="./img/zi-ban.png" height="50px">
                        </div>
                    </div>
                </div>
                <div class='my-info-content'>
                    <div class='my-info-function' @click='_openHref("fina-info.html","finaInfo")'>
                        <!-- 财务明细 -->
                        <img src="./img/my-mon-info.png" height="22px">
                        <img src="./img/left.svg" width="25px" height="25px">
                    </div>
                    <div class='my-info-function' @click='_openHref("candy-send.html","candySend")'>
                        <!-- 糖果盒 -->
                        <img src="./img/my-tangguo.png" height="22px">
                        <img src="./img/left.svg" width="25px" height="25px">
                    </div>
                    <div class='my-info-function' @click='goSiMo' v-if='simoOff'>
                        <!-- 私募认购 -->
                        <img src="./img/my-simo.png" height="22px">
                        <!-- <img src="./img/my-simo.png" height="22px" width="88px"> -->
                        <img src="./img/left.svg" width="25px" height="25px">
                    </div>
                    <div class='my-info-function' @click='goMyGroup'>
                        <!-- 我的社区 -->
                        <img src="./img/my-shequ.png" height="22px">
                        <img src="./img/left.svg" width="25px" height="25px">
                    </div>
                    <div class='my-info-function' @click='_openHref("find-we.html","findWe")'>
                        <!-- 分享推广 -->
                        <img src="./img/my-share.png" height="22px">
                        <img src="./img/left.svg" width="25px" height="25px">
                    </div>
                    <div class='my-info-function' @click='findWe'>
                        <!-- 在线反馈 -->
                        <img src="./img/my-line.png" height="22px">
                        <img src="./img/left.svg" width="25px" height="25px">
                    </div>
                </div>
            </div>
        </transition>
        <!-- 我的板块 -->

        <!-- 底部 -->
        <div id="fixed-bottom" :style="{'background':offBottom==2?'#283138':''}">
            <div @click='offBottom=1;toggleTop("assetsWrap")'>
                <div class='fixed-content assetsWrap-ev' ref='aa'>
                    <img :src="offBottom==1?'./img/home-1.png':'./img/home.png'" width="22px" height="22px">
                    <span :style="{'color':offBottom==1?'#3574fa':''}">资产</span>
                </div>
            </div>
            <div @click='offBottom=2;toggleTop("parQuoWrap")'>
                <div class='fixed-content parQuoWrap-ev'>
                    <img :src="offBottom==2?'./img/rating74.png':'./img/rating.png'" width="22px" height="22px">
                    <span :style="{'color':offBottom==2?'white':''}">行情</span>
                </div>
            </div>
            <div @click='offBottom=3;toggleTop("shangDuiWrap")'>
                <div class='fixed-content shangDuiWrap-ev'>
                    <img :src="offBottom==3?'./img/random74.png':'./img/random.png'" width="22px" height="22px">
                    <span :style="{'color':offBottom==3?'#3574fa':''}">闪兑</span>
                </div>
            </div>
            <div @click='offBottom=4;toggleTop("adppWrap")'>
                <div class='fixed-content adppWrap-ev'>
                    <img :src="offBottom==4?'./img/grid74.png':'./img/grid.png'" width="22px" height="22px">
                    <span :style="{'color':offBottom==4?'#3574fa':''}">DAPP</span>
                </div>
            </div>
            <div @click='offBottom=5;toggleTop("myInfoWrap")'>
                <div class='fixed-content myInfoWrap-ev'>
                    <img :src="offBottom==5?'./img/star-1.jpg':'./img/star.png'" width="22px" height="22px">
                    <span :style="{'color':offBottom==5?'#3574fa':''}">我的</span>
                </div>
            </div>
        </div>
        <!-- 底部 -->
    </div>
    <script src="js/comm.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/echarts.simple.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/el/index.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/base64.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/indexBack.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/update.js" type="text/javascript" charset="utf-8"></script>

    <script type="text/javascript" charset="utf-8">
        // 交易记录页面的兑换入口
        var exchange = function() {
            app.$data.assetsWrap = app.$data.parQuoWrap = app.$data.adppWrap = app.$data.myInfoWrap = false;
            app.$data.shangDuiWrap = true;
            app.$data.offBottom = 3;
            app.getHangInfo();
        };
        //用户修改头像回来
        var hanAva = function() {
            app.$data.userAvatar = JSON.parse(localStorage.getItem('user')).avatar;
        };
        var app = new Vue({
            el: '#app',
            data: {
                //用户的主页资产数据
                assetData: [{
                    "id": 89057,
                    "coinsid": 1,
                    "coins_ename": "Spor",
                    "coins_ename2": "Spower",
                    "coins_rmb": 0.69368,
                    "coins_usd": 0.1,
                    "coins_krw": 112.921394,
                    "change_percent": 0,
                    "cid": 1,
                    "coins_sort": 1001,
                    "coins_logo": "",
                    "count": "38.047646",
                    "coins_price": 0.1
                }],
                //控制用户资产的显示  true：显示  false:隐藏
                offShowMoney: true,
                //用户头像
                userAvatar: JSON.parse(localStorage.getItem('user')).avatar ? JSON.parse(localStorage.getItem('user')).avatar : './img/ava.jpeg',
                //dapp tap的值
                adppChange: 'first',
                //控制加载动画
                jiazai: false,
                //控制显示资产板块
                assetsWrap: true,
                //公告列表
                noticeDataList: [{
                    "id": 2334,
                    "cate_id": 7,
                    "title": "关于系统优化的通知",
                    "ftitle": "",
                    "news_img": "",
                    "keywords": null,
                    "description": "",
                    "body": "",
                    "addtime": 1545618337,
                    "sort": 0,
                    "hit": 0,
                    "is_open": 2,
                    "outsideid": 0
                }],
                //显示的随机公告
                notiData: {
                    title: '请尽快备份助记词'
                },
                //控制行情板块
                parQuoWrap: false,
                //行情数据
                hangList: [],
                //行情的计价方式排序
                hangSort: '',
                //控制行情的显示哪个国家的币
                offMoneyType: false,
                //控制行情涨跌幅排序  true：升序  false:降序
                offBodong: false,
                //控制闪兑板块
                shangDuiWrap: false,
                //控制闪兑的币种显示弹窗
                showShandui: false,
                transOutData: {},
                //控制闪兑 现在选的是转入还是转出的数据
                thisTrans: '',
                transInData: {},
                //汇率  转出数量  转入数量
                tranSend: {
                    //汇率
                    tranRate: '',
                    //转出数量
                    outCount: '',
                    //转入数量 是在计算属性里面计算的
                },
                //控制dapp板块
                adppWrap: false,
                //应用的页数
                page: 1,
                //控制我的板块
                myInfoWrap: false,
                //控制退出账号的提示弹窗
                offCloseUser: false,
                //防止被上拉加载多次  true 运行加载
                offUpFre: true,
                //控制自定义键盘弹窗(是输入交易密码的弹窗)
                oofTransiaction: false,
                //控制自定义的键盘
                offKeyWord: false,
                //输入的6位数交易密码
                transPass: [],
                HTTP: HTTP,
                //应用的数据
                aplayData: [],
                //控制应用的新闻数据下拉加载 多次加载  true才可以下拉
                offUpFre1: true,
                //控制应用的新闻无数据了  true表示没有数据了
                offNoData1: false,
                //私募关闭与否
                simoOff: false,
                // //控制底部 1:资产  2：行情  3：闪兑  4：DAPP  5：我的
                offBottom: 1
            },
            created: function() {
                //请求一个什么鬼接口哦
                _post(UPDATA_TIME, {
                    userid: JSON.parse(localStorage.getItem('user')).userid
                }, function() {});
                //拿主页数据
                this.indexData();
                this.noticeList();
                var This = this;
                //拿地址 给进入游戏做准备
                $.post(GAME_ADDRESS, {
                    coinsid: 3,
                    userid: JSON.parse(localStorage.getItem('user')).userid
                }, function(data) {
                    if (data.status == 1) {
                        localStorage.setItem('daiAddress', data.back);
                    }
                });
            },
            mounted: function() {
                var This = this;
                this.$nextTick(function() {
                    setTimeout(function() {
                        //处理点击input的时候影响定位问题
                        var h = document.body.scrollHeight;
                        window.onresize = function() {
                            if (document.body.scrollHeight < h) {
                                $('.san-content-list-wrap').css('bottom', '0');
                                $('#fixed-bottom').hide();
                            } else {
                                $('.san-content-list-wrap').css('bottom', '60px');
                                $('#fixed-bottom').show();
                            }
                        };
                        setTimeout(function() {
                            $('#fixed-bottom').show();
                        }, 500);
                    }, 3000);
                });

                // // //处理资产的下拉刷新
                // document.addEventListener('plusready', function() {
                //     This.handleAssetsRef();
                // }, false);
            },
            watch: {
                oofTransiaction: function(val) {
                    if (!val) {
                        this.transPass = [];
                    }
                },
                hangSort: function(val) {
                    var arr = this.hangList;

                    for (var i = 0; i < arr.length; i++) {
                        arr[i].money = arr[i][val];
                    }
                    arr.sort(function(val1, val2) {
                        return val2.money - val1.money;
                    });
                    switch (val) {
                        case 'coins_rmb':
                            $(".money-danwei").html("￥");
                            break;
                        case 'coins_usd':
                            $(".money-danwei").html("$");
                            break;
                        case 'coins_krw':
                            $(".money-danwei").html("₩");
                            break;
                    }
                },
            },
            computed: {
                //实时计算收到兑换数量
                inCount: function() {
                    if (!this.tranSend.outCount) {
                        return '';
                    }
                    // return this.tranSend.outCount * this.transOutData.coins_usd / this.transInData.coins_usd;
                    return _accDiv(_accMul(this.tranSend.outCount, this.transOutData.coins_usd), this.transInData.coins_usd);
                },
                //用户的总资产
                userAllAsset: function() {
                    var arr = this.assetData;
                    var amMoney = 0;
                    for (var i = 0; i < arr.length; i++) {
                        amMoney += parseFloat(arr[i].count) * parseFloat(arr[i].coins_price);
                    }
                    return amMoney;
                },
                //计算闪兑的手续费
                comOtherMon: function() {
                    var have = parseFloat(this.tranSend.outCount) * parseFloat(this.transOutData.coins_fprice);
                    if (have < parseFloat(this.transOutData.coins_flicker)) {
                        return parseFloat(this.transOutData.coins_flicker);
                    }
                    return have;
                }
            },
            methods: {
                //主页用户的资产数据
                indexData: function(refresh) {
                    var userid = JSON.parse(localStorage.getItem('user')).userid;
                    var This = this;
                    var copyjia = true;
                    setTimeout(function() {
                        if (copyjia) {
                            This.jiazai = true;
                        }
                    }, 800);
                    _post(INDEX, {
                        userid: userid
                    }, function(data) {
                        copyjia = false;
                        //如果是下拉刷新进来的关闭下拉刷新
                        if (refresh) {
                            var ws = plus.webview.currentWebview();
                            ws.endPullToRefresh();
                        }
                        if (data.status == 1) {
                            This.assetData = data.back;
                            This.$nextTick(function() {
                                This.jiazai = false;
                            });
                        } else {
                            This.jiazai = false;
                            _toast(data.msg);
                        }
                    });
                },
                //拉取公告列表
                noticeList: function() {
                    var This = this;
                    _post(NOTICE, {
                        page: 1
                    }, function(data) {
                        if (data.status == 1) {
                            This.noticeDataList = data.back;
                            setInterval(function() {
                                var num = parseInt(Math.random() * This.noticeDataList.length);
                                This.notiData = This.noticeDataList[num];
                            }, 3000);
                        } else {
                            _toast(data.msg);
                        }
                    });
                },
                //底部导航的切换
                toggleTop: function(val) {
                    var el = $('.' + val + '-ev');
                    el.addClass('animated bounceIn');
                    setTimeout(function() {
                        el.removeClass('bounceIn');
                    }, 600);
                    var This = this;
                    this.assetsWrap = this.parQuoWrap = this.shangDuiWrap = this.adppWrap = this.myInfoWrap = false;
                    setTimeout(function() {
                        $('body').css('background', '');
                        switch (val) {
                            case 'assetsWrap': //资产显示
                                This.assetsWrap = true;
                                This.handleAssetsRef();
                                This.indexData();
                                break;
                            case 'parQuoWrap': //行情显示
                                $('body').css('background', '#283138');
                                This.parQuoWrap = true;
                                This.getHangInfo();
                                //替换图标
                                This.$nextTick(function() {
                                    This.replaceIcon();
                                }, 200);
                                break;
                            case 'shangDuiWrap': //闪兑显示
                                This.shangDuiWrap = true;
                                This.getShanDuiInfo();
                                break;
                            case 'adppWrap': //adpp显示
                                This.adppWrap = true;
                                This.downMore();
                                break;
                            case 'myInfoWrap': //我的显示
                                This.myInfoWrap = true;
                                This.jiazai = true;
                                _post(SIMU_OFF, {}, function(data) {
                                    This.jiazai = false;
                                    if (String(data.status) == '1') {
                                        This.simoOff = true;
                                    } else {
                                        This.simoOff = false;
                                    }
                                });
                                break;
                        }
                        This.closeOnRefre();
                    }, 100);
                },
                replaceIcon: function() {
                    var par = $('.el-input__suffix-inner');
                    par.children().remove();
                    par.append('<img src="./img/down.svg" style="opacity:.5; width:20px; height:20px">');
                },
                //处理资产的下拉刷新
                handleAssetsRef: function() {
                    //到时下拉刷新 上拉加载需要了 直接放开这个return ;
                    if (plus.os.name.toLowerCase() == 'ios') {
                        return;
                    }
                    var This = this;
                    setTimeout(function() {
                        var ws = plus.webview.currentWebview();
                        var upEl = document.getElementById("ready-new-data");
                        var hei = $('#assets-fixed-content').height();
                        ws.setPullToRefresh({
                            support: true,
                            height: '20px',
                            range: '50px',
                            color: '#FF0000',
                            style: 'circle',
                        }, This.onRefresh);
                        $('#assets-fixed-content').scroll(function() {
                            var scrollTop = $(this).scrollTop();
                            //是否开启下拉刷新
                            if (scrollTop == 0) {
                                ws.setPullToRefresh({
                                    support: true,
                                    height: '20px',
                                    range: '50px',
                                    color: '#FF0000',
                                    style: 'circle',
                                }, This.onRefresh);
                            } else {
                                This.closeOnRefre();
                            }
                            //判断是不是该上拉加载了 
                            //上拉加载暂时被干掉了 需要的时候放开注释  并把upRefresh里面的逻辑写全
                            // var upTop = upEl.offsetTop;
                            // if (upTop >= scrollTop && upTop < scrollTop + hei) {
                            //     if (This.offUpFre) {
                            //         This.upRefresh();
                            //     }
                            // }
                        });
                    }, 500);
                },
                //资产下拉刷新处理逻辑
                onRefresh: function() {
                    this.indexData(true);
                },
                //关闭下拉刷新
                closeOnRefre: function() {
                    var ws = plus.webview.currentWebview();
                    ws.setPullToRefresh({
                        support: false,
                    }, function() {});
                },
                //资产上拉加载
                upRefresh: function() {
                    var This = this;
                    if (this.offUpFre) {
                        //可以加载数据
                        this.offUpFre = false;
                        setTimeout(function() {
                            This.offUpFre = true;
                        }, 2000);
                    }
                },
                //得到行情信息
                getHangInfo: function() {
                    var This = this;
                    var copyjia = true;
                    setTimeout(function() {
                        if (copyjia) {
                            This.jiazai = true;
                        }
                    }, 800);
                    _post(MARKET, {}, function(data) {
                        copyjia = false;
                        if (data.status == 1) {
                            var arr = data.back;
                            for (var i = 0; i < arr.length; i++) {
                                arr[i].money = arr[i].coins_usd;
                            }
//                          arr.sort(function(val1, val2) {
//                              return val2.money - val1.money;
//                          });
                            This.hangList = arr;
                            This.transOutData = arr[0];
                            This.transInData = arr[1];
                            This.$nextTick(function() {
                                This.jiazai = false;
                            });
                        } else {
                            This.jiazai = false;
                            _toast(data.msg);
                        }
                    });
                },
                // //处理行情的字段 加一个money字段
                // addMoney: function(type) {
                //     var arr = this.hangList;
                //     for (var i = 0; i < arr.length; i++) {
                //         arr[i].money = arr[i][type];
                //     }
                //     arr.sort(function(val1, val2) {
                //         return val2.money - val1.money;
                //     });
                // },
                //行情的涨跌幅排序
                bodongSort: function() {
                    var arr = this.hangList;
                    if (this.offBodong) {
                        arr.sort(function(val1, val2) {
                            return val1.change_percent - val2.change_percent;
                        });
                    } else {
                        arr.sort(function(val1, val2) {
                            return val2.change_percent - val1.change_percent;
                        });
                    }
                    this.offBodong = !this.offBodong;
                },
                //进入币详情
                goMoneyInfo: function(val) {
                    var This = this;
                    var web = _openHref('money-info.html', 'moneyInfo');
                    setTimeout(function() {
                        web.evalJS("getMoney(" + val.cid + ")");
                    }, 300);
                },
                //得到闪兑数据
                getShanDuiInfo: function() {
                    //这里的数据是用行情的数据
                    this.getHangInfo();
                },
                //打开闪兑中的k线
                openK: function(kline, el, textColor) {
                    function arrayMin(arrs) {
                        var min = arrs[0];
                        for (var i = 1; i < arrs.length; i++) {
                            if (arrs[i] < min) {
                                min = arrs[i];
                            }
                        }
                        return min;
                    }
                    var $el = $('#' + el);
                    if ($el.attr('off') == '0') {
                        //打开k线 kline
                        $el.attr('off', '1');
                        $el.slideDown(200);
                        var This = this;
                        setTimeout(function() {
                            This.echars(el, arrayMin(kline), kline, textColor ? true : false);
                        }, 250);
                    } else {
                        //关闭k线
                        $el.attr('off', '0');
                        $el.slideUp(200);
                    }
                },
                //图表生成
                echars: function(el, min, kline, textColor) {
                    var textStyle = {};
                    if (textColor) {
                        textStyle = {
                            textStyle: {
                                color: '#fff'
                            }
                        };
                    }
                    // 基于准备好的dom，初始化echarts实例
                    var myChart = echarts.init(document.getElementById(el));
                    // 指定图表的配置项和数据
                    var option = {
                        color: ['rgba(103,205,252,.8)'],
                        xAxis: {
                            type: 'category',
                            axisTick: {
                                show: false
                            },

                            boundaryGap: false,
                            // data: ["6519", "6517", "6523", "6545", "6551", "6551", "6526", "6538", "6522", "6511", "6509", "6498", "6471", "6496", "6483", "6523", "6520", "6508", "6487", "6470", "6483", "6480", "6489", "6456", "6489", "6477", "6481", "6484"]
                        },
                        grid: {
                            left: '0px',
                            right: '15px',
                            top: '15px',
                            bottom: '5px',
                            containLabel: true,
                        },
                        yAxis: {
                            type: 'value',
                            min: min,
                            axisTick: {
                                show: true
                            },
                            axisLabel: textStyle,
                        },
                        series: [{
                            data: kline,
                            type: 'line',
                            areaStyle: {}
                        }]
                    };
                    // 使用刚指定的配置项和数据显示图表。
                    myChart.setOption(option);
                },
                //扫码
                qrClick: function() {
                    _openHref('open-qr.html', 'openQr', 'none', true);
                },
                //调接口通知后台存地址
                haveAddress: function(coinsid) {
                    _post(HAVA_ADDRESS, {
                        coinsid: coinsid,
                        userid: JSON.parse(localStorage.getItem('user')).userid
                    }, function(data) {
                        if (data.status != 1) {
                            _toast(data.msg);
                        }
                    });
                },
                //计算收到的数量
                compuCount: function() {
                    if (!this.transOutData.coinsid || !this.transInData.coinsid) {
                        return;
                    }
                    this.tranSend.tranRate = Math.abs(this.transOutData.coins_usd / this.transInData.coins_usd);
                },
                //兑换 提交
                duihuanSub: function(pass) {
                    this.jiazai = true;
                    var This = this;
                    var user = JSON.parse(localStorage.getItem('user'));
                    _bas64Post(FLICKER, {
                        session: user.session,
                        userid: user.userid,
                        coinsid: this.transOutData.coinsid,
                        coinscount: parseFloat(this.tranSend.outCount).toFixed(6),
                        to_coinsid: this.transInData.coinsid,
                        to_coinscount: parseFloat(this.inCount).toFixed(6),
                        pin: pass
                    }, function(data) {
                        This.jiazai = false;
                        _toast(data.msg);
                        if (data.status == 1) {
                            This.oofTransiaction = false;
                            This.offKeyWord = false;
                        }
                    });
                },
                //处理时间戳
                handleTime: function(time) {
                    return _date(time);
                },
                //应用下拉加载得到更多
                downMore: function() {
                    //只进来一次就行了
                    // if (this.aplayData.news || this.aplayData.banner) {
                    //     return;
                    // }
                    this.page = 1;
                    this.offUpFre1 = true;
                    var This = this;
                    this.aplyMoreList(true);
                },
                //下拉加载更多数据
                aplyMoreList: function(one) {
                    var copyjia = true;
                    if (one == true) {
                        setTimeout(function() {
                            if (copyjia) {
                                This.jiazai = true;
                            }
                        }, 800);
                        this.jiazai = true;
                    }
                    if (!this.offUpFre1) {
                        return;
                    }
                    this.offUpFre1 = false;
                    var This = this;
                    _post(APPLY, {
                        page: this.page++
                    }, function(data) {
                        copyjia = false;
                        if (data.status == 1) {
                            if (one == true) {
                                //是第一次进来
                                This.aplayData = data.back;
                                This.$nextTick(function() {
                                    setTimeout(function() {
                                        new Swiper('.swiper-container', {
                                            autoplay: true, //可选选项，自动滑动
                                            loop: true,
                                            pagination: {
                                                el: '.swiper-pagination',
                                            },
                                        });
                                        setTimeout(function() {
                                            var dappSwiHei = $('#dapp-swiper').height();
                                            $('.dapp-posi-con-wrap').css('top', dappSwiHei + 'px');
                                            $('#aplay-wrap').css('top', (dappSwiHei + 50) + 'px');
                                            var upEl = document.getElementById("ready-new-data1");
                                            var scrEl = $($('.kuaixun')[0]);
                                            var hei = scrEl.height();
                                            scrEl.scroll(function() {
                                                var scrollTop = $(this).scrollTop();
                                                //判断是不是该上拉加载了
                                                var upTop = upEl.offsetTop;
                                                if (upTop >= scrollTop) {
                                                    if (This.offUpFre1) {
                                                        This.aplyMoreList();
                                                    }
                                                }
                                            });
                                        }, 200);
                                    }, 100);
                                });
                            } else {
                                for (var i = 0; i < data.back.news.length; i++) {
                                    This.aplayData.news.push(data.back.news[i]);
                                }
                            }
                            if (data.back.news.length < 10) {
                                //不能再拉了
                                This.offUpFre1 = false;
                                //已经没有数据了
                                This.offNoData1 = true;
                            } else {
                                This.offUpFre1 = true;
                                This.offNoData1 = false;
                            }
                            This.$nextTick(function() {
                                This.jiazai = false;
                            });
                        } else {
                            This.jiazai = false;
                            _toast(data.msg);
                            //不能再拉了
                            This.offUpFre1 = false;
                            //已经没有数据了
                            This.offNoData1 = true;
                        }
                    });
                },
                //打开比特或以太浏览器
                openOth: function(val) {
                    this.jiazai = true;
                    var This = this;
                    var web = plus.webview.create(val, 'a', {
                        'backButtonAutoControl': 'close', //返回是关闭当前页
                        'animationOptimization': 'none', //不优化
                    });
                    web.addEventListener("loaded", function() {
                        setTimeout(function() {
                            This.jiazai = false;
                            web.show('slide-in-right');
                        }, 200);
                    }, false);
                },
                //打开文章  或者分享文章
                openArticle: function(val, offSh) {
                    var div = val.body;
                    var info = JSON.parse(JSON.stringify(val));
                    delete info.news_img;
                    delete info.body;

                    if (offSh == true) {
                        //分享文章
                        var web = _openHref('share-article.html', 'shareArticle');
                        var This = this;
                        setTimeout(function() {
                            web.evalJS("send('" + JSON.stringify(info) + "','" + div + "')");
                        }, 200);
                        return;
                    }

                    var web = _openHref('notice-info.html', 'notice-info');
                    setTimeout(function() {
                        web.evalJS("sendInfo('" + JSON.stringify(info) + "','文章详情','" + div + "')");
                    }, 200);
                },
                //快速兑换
                fastConve: function() {
                    if (this.transInData.coinsid == this.transOutData.coinsid) {
                        _toast('相同币种不能兑换');
                        return;
                    }
                    if (this.transOutData.coinsid == 1 && this.transInData.coinsid != 3) {
                        _toast('平台币只能和ETH币种进行兑换');
                        return;
                    }
                    if (!this.tranSend.outCount || (String(parseFloat(this.tranSend.outCount)).length != String(this.tranSend.outCount).length)) {
                        _toast('请输入正确的数量');
                        this.tranSend.outCount = '';
                        return;
                    }
                    this.oofTransiaction = true;
                    var hei = ($(document).height() - 200) / 2;
                    setTimeout(function() {
                        $('.transaction-input-wrap').css('transform', "translateY(" + hei + "px)");
                    }, 20);
                },
                //闪兑的币种选择 进行快速兑换
                inputSanMoney: function(val) {
                    this.showShandui = false;
                    if (this.thisTrans == 'in') {
                        this.transInData = val;
                        if (this.transOutData.coinsid == 1 && this.transInData.coinsid != 3) {
                            _toast('平台币只能和ETH币种进行兑换');
                            return;
                        }
                        if (this.transInData.coinsid == this.transOutData.coinsid) {
                            _toast('相同币种不能进行兑换');
                            return;
                        }
                        this.compuCount();
                        this.haveAddress(this.transInData.coinsid);
                    } else {
                        this.transOutData = val;
                        this.compuCount();
                        this.haveAddress(this.transOutData.coinsid);
                    }
                },
                //点击互换转入转出
                toggInOut: function() {
                    var inData = this.transInData;
                    var outData = this.transOutData;
                    this.transInData = outData;
                    this.transOutData = inData;
                    this.compuCount();
                },
                //打开自定义键盘
                openKeyWord: function() {
                    if (this.offKeyWord) {
                        return;
                    }
                    var hei = $(document).height() - 470;
                    this.offKeyWord = true;
                    $('.transaction-input-wrap').css('transform', "translateY(" + hei + "px)");
                },
                //输入交易密码的值
                clkValue: function(val) {
                    if (val == '.') {
                        return;
                    }
                    var len = this.transPass.length;
                    if (len == 6) {
                        this.clkSubmit();
                        return;
                    }
                    var input = 'input' + (len + 1);
                    this.transPass.push(val);
                    this.$refs[input].innerHTML = val;
                    if (this.transPass.length == 6) {
                        this.clkSubmit();
                    }
                },
                //删除一个数值
                del: function() {
                    if (this.transPass.length == 0) {
                        return;
                    }
                    var len = this.transPass.length;
                    var input = 'input' + len;
                    this.$refs[input].innerHTML = '';
                    this.transPass.pop();
                },
                //自定义键盘的提交
                clkSubmit: function() {
                    if (this.transPass.length != 6) {
                        _toast('请输入正确的密码');
                        return;
                    }
                    var pass = this.transPass.join('');
                    if (this.oofTransiaction) {
                        this.duihuanSub(pass);
                    }
                },
                //隐藏自定义键盘
                hide: function() {
                    this.offKeyWord = false;
                },
                //打开公告列表
                openNoticeList: function() {
                    _openHref('notice-list.html', 'noticeList');
                },
                //添加地址
                // addAddress: function() {
                //     _openHref("add-address.html", 'addAddress');
                // },
                //进入智能狗列表
                goDog: function() {
                    _openHref("ai-dog.html", 'aiDog');
                },
                //截取快讯中的描述信息
                sliceDri: function(val) {
                    if (val.length > 55) {
                        return val.slice(0, 65) + '...';
                    }
                    return val;
                },
                //去到私募页面
                goSiMo: function() {
                    var op = {
                        statusbar: {
                            background: '#282929'
                        }
                    };
                    if (plus.os.name.toLowerCase() == 'android' && parseFloat(plus.os.version) < 6) {
                        //手机不行的就别开启硬件加速了
                        op.hardwareAccelerated = false;
                    }
                    this.jiazai = true;
                    var This = this;
                    var web = plus.webview.create("simo.html", "simo", op);
                    web.addEventListener("loaded", function() {
                        setTimeout(function() {
                            This.jiazai = false;
                            web.show('slide-in-right');
                        }, 200);
                    }, false);
                },
                //联系我们
                findWe: function() {
                    if (plus.os.name.toLowerCase() == 'android') {
                        var main = plus.android.runtimeMainActivity();
                        var Intent = plus.android.importClass('android.content.Intent');
                        var Uri = plus.android.importClass('android.net.Uri');
                        var intent = new Intent(Intent.ACTION_VIEW, Uri.parse('mqqwpa://im/chat?chat_type=wpa&uin=' + SERVICEQQ));
                        main.startActivity(intent);
                    } else if (plus.os.name.toLowerCase() == "ios") {
                        plus.runtime.launchApplication({
                            action: "mqq://im/chat?chat_type=wpa&uin=" + SERVICEQQ + "&version=1&src_type=web"
                        }, function(e) {
                            plus.nativeUI.confirm("检查到您未安装qq，请先到安装QQ", function(i) {
                                if (i.index == 0) {
                                    iosAppstore("itunes.apple.com/cn/app/mqq/");
                                }
                            });
                        });
                    }
                },
                //确认退出账号
                sureCloseUser: function(off) {
                    this.offCloseUser = false;
                    this.assetsWrap = this.parQuoWrap = this.shangDuiWrap = this.adppWrap = this.myInfoWrap = false;
                    this.assetsWrap = true;
                    localStorage.setItem('user', '');
                    localStorage.setItem('shouPassword', '');
                    if (off == true) {
                        return;
                    }
                    var web = plus.webview.currentWebview();
                    setTimeout(function() {
                        web.hide();
                        setTimeout(function() {
                            web.close('none');
                        }, 600);
                    }, 1000);
                    _openHref('login.html', 'login');
                },
                //dapp的导航切换事件
                handleDappTap: function(tab, ev) {
                    setTimeout(function() {
                        var dappSwiHei = $('#dapp-swiper').height();
                        $('.kuaixun').css('top', (dappSwiHei + 50) + 'px');
                    }, 200);
                },
                //进入我的社区
                goMyGroup:function(){
                	var myDate = new Date();
                	var h=Number(myDate.getHours());
                	if(h>=2&&h<=4){
                		_toast('每天凌晨2-4点暂未开放此功能');
                		return;
                	}
                	_openHref("my-group.html","myGroup");
                }
            }
        });
    </script>
    <script>
        function plusReady() {
            //处理资产的下拉刷新
            app.handleAssetsRef();
            // _update();
            //处理封号与否
            var clearSe = setInterval(function() {
                var session = JSON.parse(localStorage.getItem('user')).session;
                _post(IS_FRO, {
                    session: session,
                    userid: JSON.parse(localStorage.getItem('user')).userid
                }, function(data) {
                    if (data.back.session != session) {
                        clearInterval(clearSe);
                        app.sureCloseUser(true);
                        plus.nativeUI.alert("您的账号已在其他设备登陆，您已被迫下线", function() {
                            app.sureCloseUser();
                        }, "冻结提醒", "确定");
                        return;
                    }
                    if (data.back.is_frozen == 1) {
                        clearInterval(clearSe);
                        app.sureCloseUser(true);
                        plus.nativeUI.alert("您的账号已被冻结，请联系管理员", function() {
                            app.sureCloseUser();
                        }, "冻结提醒", "确定");
                    }
                })
            }, 10000);
            //处理封号与否
            var index = plus.webview.currentWebview();
            var all = plus.webview.all();
            var indexUrl = index.getURL();
            setTimeout(function() {
                for (var i = 0; i < all.length; i++) {
                    if (all[i].getURL() != indexUrl) {
                        all[i].hide();
                    }
                }
            }, 4000);
            setTimeout(function() {
                for (var i = 0; i < all.length; i++) {
                    if (all[i].getURL() != indexUrl) {
                        all[i].close('none');
                    }
                }
            }, 7000);
        }
        // 判断扩展API是否准备，否则监听'plusready'事件
        if (window.plus) {
            plusReady();
        } else {
            document.addEventListener('plusready', plusReady, false);
        }
    </script>
</body>

</html>
>>>>>>> parent of 9ade4b9... 你们
